<template>

  <div class="" style="width:100%;height:100%;background-image:url('../../../public/login-bg.png');background-size:cover;background-position:center;background-repeat:no-repeat;">
    <div style="width:80%;height:80px;background-image:url('../../../public/title.png');background-size:cover;margin:0 auto;background-position:center;background-repeat:no-repeat;"></div>
    <div class="w-[40%] h-[60%]" style="background-image:url(../../../public/lizi.gif);background-size:cover;background-position:center;background-repeat:no-repeat;position:absolute;z-index:999;top:20%;left:10%;">
      <div class="w-[100%] h-[100%] flex items-center default-ani">

      </div>
      <div><img src="../../../public/leftlogen.png" class="w-[70%] flex items-center" style="margin:0 auto"/></div>
    </div>
    <div>
      

      <div style="position:absolute;right:20%;top:20%;z-index:9999;background-image: url('../../../public/login-box.png');background-size:90% 90%;background-position:center;background-repeat:no-repeat;">
        <Transition appear enter-active-class="animate__animated animate__bounceInRight">
          <div class="m-auto h-[calc(100%-60px)] w-[100%] flex items-center at-2xl:max-w-400px at-lg:max-w-400px at-md:max-w-400px at-xl:max-w-400px">
            <!-- 账号登录 -->
            <LoginForm class="m-auto h-auto lt-xl:(rounded-3xl light:bg-white)" style="padding:60px 80px 40px 80px"/>
            <!-- 手机登录 -->
            <MobileForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />
            <!-- 二维码登录 -->
            <QrCodeForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />
            <!-- 注册 -->
            <RegisterForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />
            <!-- 三方登录 -->
            <SSOLoginVue class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />
            <!-- 忘记密码 -->
            <ForgetPasswordForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />
          </div>
        </Transition>
      </div>
    </div>
  </div>
</template>
<script lang="ts" setup>
import { underlineToHump } from '@/utils'

import { useDesign } from '@/hooks/web/useDesign'
import { useAppStore } from '@/store/modules/app'
import { ThemeSwitch } from '@/layout/components/ThemeSwitch'
import { LocaleDropdown } from '@/layout/components/LocaleDropdown'

import { LoginForm, MobileForm, QrCodeForm, RegisterForm, SSOLoginVue, ForgetPasswordForm } from './components'

defineOptions({ name: 'Login' })

const { t } = useI18n()
const appStore = useAppStore()
const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('login')
</script>

<style lang="scss" scoped>
$prefix-cls: #{$namespace}-login;

.#{$prefix-cls} {
  overflow: auto;

  &__left {
    &::before {
      position: absolute;
      top: 0;
      left: 0;
      z-index: -1;
      width: 100%;
      height: 100%;
      background-image: url('@/assets/svgs/login-bg.svg');
      background-position: center;
      background-repeat: no-repeat;
      content: '';
    }
  }
}
</style>

<style lang="scss">
.dark .login-form {
  .el-divider__text {
    background-color: var(--login-bg-color);
  }

  .el-card {
    background-color: var(--login-bg-color);
  }
}

.default-ani{
  background-image:url(../../../public/circle.png);background-size: 70%;background-position:center;background-repeat:no-repeat;position:absolute;
  animation: rotate 8s linear infinite;
}
/* 定义旋转动画 */
@keyframes rotate {
  from {
    transform: rotate(0deg); /* 初始角度 0° */
  }
  to {
    transform: rotate(360deg); /* 结束角度 360°（一圈） */
  }
}
</style>
